package com.java1234.dao;

import java.sql.Connection;
import java.sql.Date;
import java.sql.PreparedStatement;


import com.java12234.vo.UserInfo;


public class FundDao {
	/**
	 * @param con
	 * @param fund
	 * @return
	 * @throws Exception
	 */
	public int fundAdd(Connection con,UserInfo user)throws Exception{
		
	    user.setDate(new java.util.Date());
		String sql="insert into user_info (user_name,user_pwd,create_date,accout) values(?,?,?,??)";
		PreparedStatement pstmt=con.prepareStatement(sql);
		pstmt.setString(1,user.getUserName());
		pstmt.setString(2, user.getUserPwd());
		pstmt.setDate(3, (Date) user.getDate());
		pstmt.setInt(4, user.getAccout());
		
		return pstmt.executeUpdate();
	}
}
	
	